package com.subject.shuati.application.covert;

import com.subject.shuati.application.dto.SubjectInfoDto;
import com.subject.shuati.domain.entity.SubjectInfoBo;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * BO与Dto之间的转换
 */
@Mapper
public interface SubjectInfoDtoConverter {

    SubjectInfoDtoConverter INSTANCE = Mappers.getMapper(SubjectInfoDtoConverter.class);

    /**
     * dto转bo
     * @param subjectInfoDto
     * @return
     */
    SubjectInfoBo DtoConverterInfoBo(SubjectInfoDto subjectInfoDto);

    /**
     * BoList转DtoList
     * @param subjectInfoBoList
     * @return
     */
    List<SubjectInfoDto> DtoConverterInfoBoList(List<SubjectInfoBo> subjectInfoBoList);

    SubjectInfoDto BOConvertToDTO(SubjectInfoBo subjectInfoBo);
}
